Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODFacet


CreateFacetIterator

The CreateFacetIterator method creates a facet iterator object for the embedded facets of this facet.

ODFacetIterator CreateFacetIterator (
                        in ODTraversalType traversalType,
                        in ODSiblingOrder siblingOrder);
traversalType
The traversal type to assign to the facet iterator. The value of traversalType must be one of the following: kODTopDown, kODBottomUp, or kODChildrenOnly.
siblingOrder
The order (either front-to-back or back-to-front) in which the iterator traverses the sibling facets. The value of siblingOrder must be one of the following: kODBackToFront or kODFrontToBack.
return value
A reference to a new facet iterator object.
DISCUSSION
The value kODTopDown for the traversalType parameter indicates that you should traverse the facet hierarchy top down, in depth-first order, with this facet as the root. The value kODBottomUp indicates that you should traverse the facet hierarchy bottom up, visiting this facet after visiting all its children. Both kODTopDown and kODBottomUp include this facet in the traversal. The value kODChildrenOnly indicates that you should traverse only the children of this facet (not including this facet itself).

Your part calls this method if it needs to apply an operation to a facet and all its embedded facets. For example, OpenDoc might use a facet iterator to make sure that all facets within a facet being invalidated are also invalidated. It is your responsibility to delete the iterator when it is no longer needed.

While you are using a facet iterator, you should not modify the list of embedded facets. You must postpone adding items to or removing items from the list of embedded facets until after you have deleted the iterator.

SEE ALSO
The ODTraversalType type (page 881).
The ODSiblingOrder type (page 881).
The ODFrame::CreateFacetIterator method (page 315).
The ODFacetIterator class (page 259).
Table 11-1 on page 466 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help